/** 
 *  @file       main.c
 *  @brief      按键控制LED点亮
 *  @author     Z B T  
 *  @version    
 *  @date       2015-10 
 */
 
#include "led.h"
#include "delay.h"
#include "key.h"
#include "config.h"

void main(void)
{
    led_off(LED_ALL);
    
    while(1)
    {     
        switch (key_scan())
        {
        case KEY_1:
            led_on(LED_0);
            break;
        case KEY_2:
            led_on(LED_1);
            break;
        case KEY_3:
            led_on(LED_2);
            break;
        case KEY_4:
            led_on(LED_3);
            break;
        case KEY_5:
            led_on(LED_4);
            break;
        case KEY_6:
            led_on(LED_5);
            break;
        case KEY_7:
            led_on(LED_6);
            break;
        case KEY_8:
            led_on(LED_7);
            break;
        default:
            break;
        }
    }
}
